package com.yuzhitong.shapi.model;

import com.yuzhitong.shapi.base.Contents;
import com.yuzhitong.shapi.base.net.BaseListBean;
import com.yuzhitong.shapi.base.net.BaseObjectBean;
import com.yuzhitong.shapi.bean.CategoryBean;
import com.yuzhitong.shapi.bean.PlayAddressBean;
import com.yuzhitong.shapi.contract.MovieContract;
import com.yuzhitong.shapi.net.RetrofitClient;

import java.util.Map;

import io.reactivex.rxjava3.core.Observable;

/**
 * Created by Brsya
 * CreateDate: 2022/5/8  14:41
 * Description:
 * 影视页
 */
public class MovieModel implements MovieContract.Model {
    @Override
    public Observable<BaseListBean<CategoryBean>> getCategory(Map<String, Object> par) {
        return RetrofitClient.getInstance().getApi().getCategory(Contents.BASE_URL + "/videos/getCategoryByAll", par);
    }

    @Override
    public Observable<BaseObjectBean<PlayAddressBean>> getPlayAddressNew(Map<String, Object> par) {
        return RetrofitClient.getInstance().getApi().getPlayAddressNew(Contents.BASE_URL + "/videos/getPlayerJxUrl", par);
    }
}
